{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 分类问题的评估方法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    
   ],
   "source": [
    "from sklearn.datasets import load_breast_cancer\n",
    "data = load_breast_cancer()\n",
    "X = data.data\n",
    "y = 1 - data.target\n",
    "# 反转标签的0和1\n",
    "\n",
    "X = X[:, :10]\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "model_lor = LogisticRegression()\n",
    "model_lor.fit(X, y)\n",
    "y_pred = model_lor.predict(X)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 混淆矩阵"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[337  20]\n",
      " [ 30 182]]\n"
     ]
    }
   ],
   "source": [
    "from sklearn.metrics import confusion_matrix\n",
    "cm = confusion_matrix(y, y_pred)\n",
    "print(cm)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 正确率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9121265377855887"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.metrics import accuracy_score\n",
    "accuracy_score(y, y_pred)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 精确率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.900990099009901"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.metrics import precision_score\n",
    "precision_score(y, y_pred)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 召回率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.8584905660377359"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.metrics import recall_score\n",
    "recall_score(y, y_pred)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## F值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.8792270531400966"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.metrics import f1_score\n",
    "f1_score(y, y_pred)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 预测概率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[7.69543428e-03, 9.92304566e-01],\n",
       "       [2.03561990e-02, 9.79643801e-01],\n",
       "       [2.34733703e-03, 9.97652663e-01],\n",
       "       ...,\n",
       "       [2.34686021e-02, 9.76531398e-01],\n",
       "       [8.11350734e-06, 9.99991886e-01],\n",
       "       [9.99573328e-01, 4.26671727e-04]])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model_lor.predict_proba(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[267  90]\n",
      " [  6 206]]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "y_pred2 = (model_lor.predict_proba(X)[:, 1]>0.1).astype(np.int)\n",
    "print(confusion_matrix(y, y_pred2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.8312829525483304\n",
      "0.9716981132075472\n"
     ]
    }
   ],
   "source": [
    "print(accuracy_score(y, y_pred2))\n",
    "print(recall_score(y, y_pred2))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## ROC曲线与AUC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.metrics import roc_curve\n",
    "probas = model_lor.predict_proba(X)\n",
    "fpr, tpr, thresholds = roc_curve(y, probas[:, 1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAFZCAYAAACxNmXgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3dfVzNd/8H8NepNJVWnFXuUoq16pIoN5WJmOYuRCbXNmJm5GbDj/rthlwbpZ/95gqJFmtkE+V2tI3I3GeKzX5uIrerFIWkps7vj67OHJ2O7znO6Xyr1/Px8Hhc53tzvu/Purz6+Hy/389HUlxcLAMREYmWgb4LICIi1RjUREQix6AmIhI5BjURkcgxqImIRI5BTUQkcgxqIiKRY1ATEYmckb4LqA8WFhZqHZ+ZmQlPT08dVaM/jbVdANvWEDXWdgGata2kpKTOfexRExGJHIOaiEjkGNRERCLHoCYiEjkGNRGRyDGoiYhETq9BfeTIEYwbNw7Ozs6wtLTEpk2bnnvO77//jiFDhqB169ZwdnZGVFQUZDJOqU1EjZdeg7q0tBQuLi6IjIyEiYnJc4+/f/8+Ro0aBWtraxw4cACRkZGIiYnBypUr66FaIiL90OsLL4MGDcKgQYMAANOnT3/u8cnJySgrK0NsbCxMTEzg4uKCixcvYvXq1ZgxYwYkEomuSybSu5ycHOzevRvFxcX6LuWF7dmzR98l6MTQoUO1+n0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w9PTE1q1bYWbWSMe6iKjJ0yiob968icLCQnTq1AktWrR4oQLee+89vPfee0r3xcbG1to2evRojB49+oWuSUTUkKg19LF79250794dbm5u8PPzw+nTpwFUP2rn7e2NXbt26aRIIqKmTHBQp6Wl4d1338Urr7yCBQsWQCaTyfdJpVK0b98eSUlJOimSiKgpExzUy5YtQ69evfDjjz9iypQptfb36NED586d02px+lYzxwcRkT4JDurz588jMDCwzv02NjYoLCzUSlFiwfUQiUgMBAe1sbExysvL69x/48YNvPxy45nuMycnh+shEpEoCA7q3r17IzU1Vem++/fvY9OmTXj99de1Vpi+KVscgJMwEZE+CA7qsLAw/P777xg5ciT27t0LADh79iwSEhLg6+uL+/fvY/78+TortL4pWxyg3bAQTmlKRPVOcFB369YNW7duxa1btzBjxgwAwGeffYa5c+fC0NAQW7duhZOTk84K1Tf2pIlIX9R64aVPnz44deoUzp07h5ycHFRVVaFjx45wd3evc8a7xoI9aSLSF8FBvXnzZnh7e8POzg5dunRBly5dFPZfu3YNR48eRXBwsNaLrG937tzRdwlERHKChz5CQ0Nx8uTJOvefPn0aoaGhWilK3xrb8+BE1LAJDuqn30RURtkUpA1VWVmZwmc+kkdE+qRy6OPGjRu4fv26/PPFixdx5MiRWscVFxdj/fr1sLNrnOO4vJFIRPqkMqg3bdqEqKgoSCQSSCQSLF++HMuXL691nEwmg4GBQaN43TonJ6fWNt5IJCJ9UhnUI0aMwKuvvgqZTCafjvTZ5a4kEglMTU3RtWtXtG7dWqfF1gdlL7oQEemTyqB2dnaGs7MzAKC8vBze3t6wt7evj7r0RtmLLkRE+iT48bzx48frsg7R4vg0EembWi+8lJeXY9euXcjKykJJSUmtBWUlEglWrlyp1QL1jePTRKRvgoP61q1bCAgIwJUrV2BhYYH79++jZcuWKC4uRlVVFaRSKdctJCLSAcHPUS9cuBB37tzBvn37cPr0achkMiQkJOD27dv49NNPYWJigh07duiyViKiJklwUB88eBCTJ09Gr169YGDw92kvvfQS5syZA29vb4SHh+ukSCKipkxwUD98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vL/td//RcGDhwIIyMjvPnmmyqfVgkMDERqaipiYmLQu3dvtG/fXmH/2LFjsWvXLoSFheHIkSPw8fGBRCLBlStXsHPnTnz++edKn9QRYsaMGXj33XeRmJiIqVOnYvDgwdi1axeCg4MxePBg3L59G19//TUcHR3x22+/1WrroUOHEBMTg7Zt2+KVV16Br68vZs6ciR9//BHvvPMOxo4dCw8PD5SXl+Py5ctITU1FcnJyg32hSgwY1KTSnDlz5M/V7tixA87OzkhISMC2bdvkT0vUZdq0adi7dy8yMjLw+PFjtGvXDh9++CE+/PBD+TGdOnXCwYMHsWzZMiQnJ6OwsBBSqRROTk61hgM0JZVKkZaWhoiICKxfvx6PHj1Cp06dEBsbi+DgYPlxY8eORWJiItavX4/i4mJYW1vjjTfewIIFC+S/WJQZOXIkTp48idTUVGzduhUymQzZ2dkqg3rQoEF4+eWXcf/+fYWnPWoYGBggMTERcXFxSEpKwk8//QRjY2PY2tpi7Nix8PLy0vi/x7Bhw+Dg4ICYmBhMmjQJ48ePR2FhIb7++mscPHgQDg4OWLJkCa5cuVIrqCMjIzFnzhxERkaitLQUPj4+8PX1hYmJCXbu3IkVK1YgJSUF27Ztg5mZGezt7TFt2jR07txZ43qJi9sSEYkex6iJiESOQU1EJHIMaiIikWNQExGJHIOaiEjkGNRERCLHoCYiEjkGNRGRyDGoiYhEjkFNRCRy/w/PPIK2syMZzgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 345.6x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "plt.style.use('fivethirtyeight')\n",
    "\n",
    "fig, ax = plt.subplots()\n",
    "fig.set_size_inches(4.8, 5)\n",
    "\n",
    "ax.step(fpr, tpr, 'gray')\n",
    "ax.fill_between(fpr, tpr, 0, color='skyblue', alpha=0.8)\n",
    "ax.set_xlabel('False Positive Rate')\n",
    "ax.set_ylabel('True Positive Rate')\n",
    "ax.set_facecolor('xkcd:white')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9741557000158554"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.metrics import roc_auc_score\n",
    "roc_auc_score(y, probas[:, 1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 回归问题的评估方法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.datasets import load_boston\n",
    "data = load_boston()\n",
    "X = data.data[:, [5,]]\n",
    "y = data.target"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.linear_model import LinearRegression\n",
    "model_lir = LinearRegression()\n",
    "model_lir.fit(X, y)\n",
    "y_pred = model_lir.predict(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[9.10210898]\n",
      "-34.67062077643857\n"
     ]
    }
   ],
   "source": [
    "print(model_lir.coef_)\n",
    "print(model_lir.intercept_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAD1CAYAAABz79PWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deXxU1fn48c+ZyTIhCQFRgbK6RBRBqQtCQJRFBKliXXDfq7ZU1NIFrPJT64aKtW5fW9GKClZccMEVlSIqVC0uKKAMsiQoDYKQZEJmkpk5vz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l7Kk/onXHXfcwQMPPADApEmTuPHGGxkzZgxHHnkkK1asAMDn8zFr1ixGjx5NRUUFjz/+OBCY6XbKKacwatQoKioqeO211wDYsmULQ4cO5fe//z2jRo1i69atLc45dOhQtm3bBsCOHTu44IILGD16NKNHj+Y///lP6PVTTz2VUaNGce211zJo0CB27twZ8dj3339/qG633347APX19UyZMoURI0YwfPhwFi1aBMBNN93EMcccQ0VFBTfccEOba7B69WrGjRtHRUUF5513Hrt37za8NomQFosFTz2Vz7Rp5tnyS5a4GDq0Y2TLC5FrvF4vS5cuZcmSJdx55528/PLLPPXUU3Tu3Jl///vfeDweTjzxREaPHk3v3r2ZP38+nTt3ZufOnYwbN44xY8YAgQkdDz30EPfcc0+bc7zzzjtMmjQJgJkzZzJ16lSGDx9OVVUVp59+Oh9//DF33nkno0aNYvr06bzzzjvMmzcv9P7wYy9dupRvv/2WpUuXorXmnHPO4cMPP2THjh306NGDZ599FoCamhp27drFq6++yieffIJSKhQ0wv3617/mrrvuYuTIkdx2223Mnj2b2bNnR702iZDAYuDNN/M4+2zzbPmFC+s58cSOlS0vRK45+eSTARgyZAiVlZUALF26lDVr1oRupLW1tWzcuJFevXpxyy238OGHH2Kz2di2bRs//PADAH369OHoo49uc+zt27ezzz77hFoLy5Yt4+uvvw6Vqauro66ujpUrVzJ//nwAxo0bR5ewAdjwYy9dupSlS5dy7LHHAoGWyrfffktFRQWzZs3ixhtv5MQTT6SiogKv10thYSHTpk1j/PjxTJgwoUX9ampqqK2tZeTIkQCce+65XHTRRYbXJhESWCL44otijj7avAn+4IN7OP98yZYXIhcUFjZviW234/UGHgS11tx1112MHTu2RdkFCxawY8cO3nvvPfLz8xk8eDBut5vCwkKKi9s+bC5evJhOnToxdepUbr/9dm6//Xb8fj9vv/02Ra2mggbHZSIJP7bWmunTp3PJJZe0Kffee++xZMkS/vKXvzB69GhmzJjB0qVLee+993jhhReYO3cuixcvTujaJELGWMJ8/bWNLl3K+NWvDjEs9//+n5vdu2skqAgRwe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JOJUqpYKVUa/DcwnkAzuEPRWv8PqFJKDWh+aSywNoNVyqRz6KDdYM0qgWFKqU5KKUXgd2FdhuuUdkqpfZv/7guchsHvhMwKE611B14M/P8hD3haa/1mZquUMdOABc1dQRuBSzJcn7Rr7k8/Abgy03XJFK31R0qp54FPCXT/fAY8ktlaZcQLSqluQBPwW631rmgFJfNeCCFEUklXmBBCiKSSwCKEECKpJLAIIYRIKgksQgghkkoCixBCiKSSwCKEECKpJLAIIYRIKgksQgghkur/A/VHhT3+g+Y6AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "fig, ax = plt.subplots()\n",
    "ax.scatter(X, y, color='pink', marker='s', label='data set')\n",
    "ax.plot(X, y_pred, color='blue', label='LinearRegression')\n",
    "ax.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 均方误差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "43.60055177116956"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.metrics import mean_squared_error\n",
    "mean_squared_error(y, y_pred)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 决定系数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.48352545599133423"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.metrics import r2_score\n",
    "r2_score(y, y_pred)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 与其他算法进行比较"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.svm import SVR\n",
    "model_svr_linear = SVR(C=0.01, kernel='linear')\n",
    "model_svr_linear.fit(X, y)\n",
    "y_svr_pred = model_svr_linear.predict(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAD1CAYAAABz79PWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO2deXxU1fn/3+dOlglJSAARkF0IIBJE64IRN0AUl7ogKtVKcWul1SqtFbefWnfFWlv9Wpe2LmCrVURxRU3FBauIS5B1QCBhMQiSlcwkM3N+f0xmmCQzc2dfkuf9euWVzJ1zz33uncn93HOe5SitNYIgCIIQL4xUGyAIgiB0LkRYBEEQhLgiwiIIgiDEFREWQRAEIa6IsAiCIAhxJStRHdfW1kq4mSAIQienqKhItd8mIxZBEAQhroiwCIIgCHFFhCUANpst1SakBXId5Bp4kesg18BLONdBhEUQBEGIKyIsgiAIQlwRYREEQRDiSljhxkqpzUA94AKcWuvDlVI9gReAIcBm4Dyt9Z7EmCkIgiBkCpHksZyotd7l93ou8L7W+l6l1NzW19fH1TohaVgrq7E4mttsG9kEOZXV2Af1SZFViSHQuQK4cnNiOtdE9ZvKY3v7HdkEebaquPUbybHbE+2xvf0ZjmaUuzXNzvvbUPv+9mJ40jNcWVm4CvI6XINobAl0Toa9GRS4c3Ni6jvQcQx7M8qvgr02FO7cnIR/frEkSJ4JnND69zPAB4iwZCwWRzNZjfY22woBZ4B/7Ewn0Lmmc7+pPLa330KAJJ9bvM8pZH/tRcVvm8XpBEczhW5ivgahbDCciT9X5dZxPU4wwvWxaGCJUmqFUuqK1m19tNY7AF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WF5UN6U44tdqipbi4KK791dREF+J7zz33UFBQwFVXXcVpp53G4YcfzkcffURtbS1//etfKSsrw+Vycdttt/Hxxx/jcDi4/PLLmTVrFg0NDfzsZz+jpqYGp9PJTTfdxKRJk9iyZQvTp0/n2GOP5fPPP2fBggVtjnnkkUfy+OOPA7Br1y6uvfZatm7d6rNn/Pjx7Nq1i8suu4wff/yRww47jPfee4+lS5fS0NDQoe9Fixbxyiuv4HA4OP3007nxxhtpbGxk1qxZbNu2DbfbzXXXXcc555zDbbfdxltvvYXFYmHixInceeedba5BRUUFc+bMYe/evQwdOpRHH32U4uLioNcmFkRY0pDaBguHXDqaLdWhQ4dPPrmFBQv2kpWET9HtlwOSySRyLRshvXE6nZSXl7NkyRLuu+8+Xn31VZ577jm6d+/Of//7XxwOByeffDInnngiAwYMYP78+XTv3p3du3czefJkJk6cCHhyeh599FEefPDBDsd47733OO200wCYO3cus2fP5uijj6aqqopp06bx+eefc99993HccccxZ84c3nvvPZ5++mnf/v59l5eXs3HjRsrLy9FaM2PGDD755BN27dpF3759efHFFwGora1lz549vP766yxfvhylFDU1NR1s+9WvfsX999/PhAkTuOuuu7j33nu59957g16bWBBhSSPsdph66VA+rQjtmC8tdfHOOw10Mw8IE9rRVXwOQkfOOOMMAMaNG0dlpafAanl5OatWrfLdSOvq6vjuu+/o378/d9xxB5988gmGYbBjxw5++OEHAAYOHMgRRxzRoe+dO3fSu3dvbr75ZgA++OAD1q5d62tTX19PfX09n376KfPnzwdg8uTJFBf7yi626bu8vJzy8nKOPfZYABobG9m4cSNlZWXccsst3HrrrZx88smUlZXhdDrJzc3lqquuYsqUKZxyyilt7KutraWuro4JEyYA8LOf/YyZM2eGvDaxIMKSBrhccOmleSxaFHpaqXdvN5991kDPnolb9Ml/ass/QbKzzsN3dtKhpE66kJvb6tuzWHA6PdGSWmvuv/9+Jk1qm++9YMECdu3axdKlS8nOzqa0tBS73U5ubi75+R0f/BYvXky3bt2YPXs2d999N3fffTdut5t3332XvLy2OW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ta5JrVUpZRKwUWvdVdfczQLylFJZeB4wtqfYnmRzEPA/rfVerbUTWAqcHayxCEtH/gz8AejKdfo1sEQptUIpdUWqjUkRBwI/AP9snRZ9SimVn2qjUsgFwL9SbUQq0FpvA+YBlcAOoFZrvSS1ViWdb4HjlFK9lFLdgFOBoPVtRFj8UEqdDuzUWq9ItS0p5hit9WHAVODXSqnjUm1QCsgCDgMe01ofCjQCc1NrUmponQb8KRB4MfhOjlKqB3AmMBQ4AMhXSl2UWquSi9Z6DXAf8C7wNvANEHRNExGWthwD/FQptRn4NzBRKTU/tSYlH6319tbfO/HMqR+ZWotSwlZgq9b6s9bXL+ERmq7IVOBLrXV1qg1JEZOBTVrrH7TWLcBCoCzFNiUdrfXftdaHaa2PA34EAvpXQISlDVrrG7TWA7TWQ/AM/cu11l3qyUQpla+UKvT+DUzBMwzuUmitvweqlFIjWzdNAlan0KRUMoMuOg3WSiUwXinVTSml8HwX1qTYpqSjlNq/9fcg4BxCfCckKkxoTx/gFc//D1nA81rrt1NrUsq4CljQOhX0HTArxfYkndb59JOAX6ballShtf5MKfUS8CWe6Z+vgCdSa1VKeFkp1QtoAX6ttd4TrKFk3guCIAhxRabCBEEQhLgiwiIIgiDEFREWQRAEIa6IsAiCIAhxRYRFEARBiCsiLIIgCEJcEWERBEEQ4ooIiyAIghBX/j+wRObR1DA3NgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "fig, ax = plt.subplots()\n",
    "ax.scatter(X, y, color='pink', marker='s', label='data set')\n",
    "ax.plot(X, y_pred, color='blue', label='LinearRegression')\n",
    "ax.plot(X, y_svr_pred, color='red', label='SVR')\n",
    "ax.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "72.14197118147209\n",
      "0.14543531775956597\n",
      "[[1.64398]]\n",
      "[11.13520958]\n"
     ]
    }
   ],
   "source": [
    "print(mean_squared_error(y, y_svr_pred)) # 均方误差 \n",
    "print(r2_score(y, y_svr_pred)) # 决定系数\n",
    "print(model_svr_linear.coef_) # 斜率\n",
    "print(model_svr_linear.intercept_) # 截距"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 超参数的设置"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "37.40032481992347\n",
      "0.5569708427424378\n"
     ]
    }
   ],
   "source": [
    "model_svr_rbf = SVR(C=1.0, kernel='rbf')\n",
    "model_svr_rbf.fit(X, y)\n",
    "y_svr_pred = model_svr_rbf.predict(X) \n",
    "print(mean_squared_error(y, y_svr_pred)) # 均方误差\n",
    "print(r2_score(y, y_svr_pred)) # 决定系数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "69.32813164021485\n",
      "-1.4534559402985217\n"
     ]
    }
   ],
   "source": [
    "train_X, test_X = X[:400], X[400:]\n",
    "train_y, test_y = y[:400], y[400:]\n",
    "model_svr_rbf_1 = SVR(C=1.0, kernel='rbf')\n",
    "model_svr_rbf_1.fit(train_X, train_y)\n",
    "test_y_pred = model_svr_rbf_1.predict(test_X) \n",
    "print(mean_squared_error(test_y, test_y_pred)) # 均方误差\n",
    "print(r2_score(test_y, test_y_pred)) # 决定系数"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 将数据分为训练数据和验证数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.datasets import load_breast_cancer\n",
    "data = load_breast_cancer()\n",
    "X = data.data\n",
    "y = data.target\n",
    "from sklearn.model_selection import train_test_split\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.9120603015075377\n",
      "0.9064327485380117\n"
     ]
    }
   ],
   "source": [
    "from sklearn.svm import SVC\n",
    "model_svc = SVC()\n",
    "model_svc.fit(X_train, y_train)\n",
    "y_train_pred = model_svc.predict(X_train)\n",
    "y_test_pred = model_svc.predict(X_test)\n",
    "from sklearn.metrics import accuracy_score\n",
    "print(accuracy_score(y_train, y_train_pred))\n",
    "print(accuracy_score(y_test, y_test_pred))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.0\n",
      "0.9298245614035088\n"
     ]
    }
   ],
   "source": [
    "from sklearn.ensemble import RandomForestClassifier\n",
    "model_rfc = RandomForestClassifier()\n",
    "model_rfc.fit(X_train, y_train)\n",
    "y_train_pred = model_rfc.predict(X_train)\n",
    "y_test_pred = model_rfc.predict(X_test)\n",
    "from sklearn.metrics import accuracy_score\n",
    "print(accuracy_score(y_train, y_train_pred))\n",
    "print(accuracy_score(y_test, y_test_pred))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 交叉验证（cross validation）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.95614035, 0.96491228, 0.93859649, 0.95614035, 0.99115044])"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.model_selection import cross_val_score\n",
    "from sklearn.model_selection import KFold\n",
    "cv = KFold(5, shuffle=True)\n",
    "model_rfc_1 = RandomForestClassifier()\n",
    "cross_val_score(model_rfc_1, X, y, cv=cv, scoring='accuracy')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.97183099, 0.96240602, 0.98611111, 0.97101449, 0.94267516])"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cross_val_score(model_rfc_1, X, y, cv=cv, scoring=\"f1\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 搜索超参数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.datasets import load_breast_cancer\n",
    "data = load_breast_cancer()\n",
    "X = data.data\n",
    "y = 1 - data.target # 反转标签的0和1\n",
    "X = X[:, :10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=KFold(n_splits=5, random_state=None, shuffle=True),\n",
       "             estimator=RandomForestClassifier(),\n",
       "             param_grid={'max_depth': [5, 10, 15],\n",
       "                         'n_estimators': [10, 20, 30]},\n",
       "             scoring='accuracy')"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.ensemble import RandomForestClassifier\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.model_selection import KFold\n",
    "cv = KFold(5, shuffle=True)\n",
    "param_grid = {'max_depth': [5, 10, 15], 'n_estimators': [10, 20, 30]}\n",
    "model_rfc_2 = RandomForestClassifier()\n",
    "grid_search = GridSearchCV(model_rfc_2, param_grid, cv=cv, scoring='accuracy')\n",
    "grid_search.fit(X, y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.9384878124514827\n",
      "{'max_depth': 15, 'n_estimators': 30}\n"
     ]
    }
   ],
   "source": [
    "print(grid_search.best_score_)\n",
    "print(grid_search.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "grid_search = GridSearchCV(model_rfc_2, param_grid, cv=cv, scoring='f1')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
